<header>
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="row">
                <div class="logo">
                    <a href="{:U('/')}" title="66Play">
                        <img src="__PUBLIC__/Home/ui3/images/logo.png" alt="logo">
                    </a>
                </div>
                <div class="logo2">
                    <a href="{:U('/')}" title="66Play">
                        <img src="__PUBLIC__/Home/ui3/images/logo2.png" alt="logo">
                    </a>
                </div>
                <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                    <ul class="nav navbar-nav pull-left">
                        <li class="JS-header_btn">
                            <a href="{:U('Visitor/index')}" title="主页">
                                <i class="li-img home"></i>
                                <div class="span">主页</div>
                            </a>
                        </li>
                        <li class="JS-header_btn">
                            <a href="{:U('Search/explore')}" title="探索">
                                <i class="li-img find"></i>
                                <div class="span">探索</div>
                            </a>
                        </li>
                        <li class="JS-header_btn">
                            <a href="{:U('Match/index')}" title="赛事">
                                <i class="li-img match"></i>
                                <div class="span">赛事</div>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="header-input col-xs-5 col-sm-5 col-md-5 col-lg-6">
                    <div class="input input-group input-group-nav">
                        <input type="text" class="form-control JS_header_search_input" id="input-search" name="key" placeholder="试试搜点儿什么..." title="试试搜点儿什么...">
                        <span class="input-group-btn JS_header_search">
                            <a role="button" class="search btn" aria-label="Left Align">
                                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                            </a>
                        </span>
                    </div>
                </div>
                <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                    <ul class="nav navbar-nav pull-right">
                        <li class="JS-header_btn">
                            <a href="{:U('Download/index')}" title="下载">
                                <i class="li-img download-img"></i>
                                <div class="span">下载</div>
                            </a>
                        </li>
                        <li class="login-btn JS-header_btn">
                            <a href="{:U('user/login')}" title="登录">
                                <i class="li-img login-img loginTab"></i>
                                <div class="span">登录</div>
                            </a>
                        </li>
                        <li class="register-btn JS-header_btn">
                            <a href="{:U('user/register')}" title="注册">
                                <i class="li-img person-img registerTab"></i>
                                <div class="span">注册</div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="top-shadow"></div>
    </nav>
</header>
<script type="text/javascript">
    $(function(){
        var currentTab = "{$currentTab}";
        if (currentTab != '') {
            $(".li-img."+currentTab).parents('li').addClass('active');
        }

        $('.JS_logout').click(function(){
            $.post("{:U('User/logout')}",{}, function(){
                location.reload();
            });
        });

        $('.JS_header_search').click(function(){
            var str = $('.JS_header_search_input').val();
            if (str.length > 0) {
                location.href = "{:U('search/video')}?keywords="+str;
            }
        });
        $(".JS_header_search_input").keydown(function (e){
            if(e.which == "13"){
                $('.JS_header_search').click();
            }
        });

        $(".info-btn").click(function(){
            $(".JS_popup").fadeToggle();
            return false;
        });
        $(document).click(function(){
            $(".JS_popup").fadeOut();
        });
    });

    function warning() {
        alert('功能暂未开通');
    }
</script>